package com.ethink.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.info.PurchaseOrderInfo;
import com.ethink.order.api.model.PurchaseOrderModeModel;
import com.ethink.order.api.model.PurchaseOrderModel;
import com.ethink.order.api.request.*;
import com.ethink.order.api.response.OverseasDeleveryPreQueryResponse;
import com.ethink.order.api.response.PurchaseOrderDetailQueryResponse;
import com.ethink.order.common.entity.PurchaseOrder;

import java.util.List;

/**
 * 采购单 Service接口
 *
 * @author default
 * @date 2022-10-31
 */
public interface PurchaseOrderService {

    /**
     * @param request
     * @return
     */
    PurchaseOrder add(PurchaseOrderAddRequest request);

    Page<PurchaseOrderModel> purchaseOrderPageQuery(PurchaseOrderPageQueryRequest request);

    /**
     * 采购订单详情
     *
     * @param id
     * @return
     */
    PurchaseOrderDetailQueryResponse queryPurchaseOrderDetail(Long id);

    Integer purchaseOrderRefine(PurchaseOrderRefineRequest refineRequest);

    OverseasDeleveryPreQueryResponse overseasDeliveryPreQuery(Long id);

    void updateStatus(PurchaseOrderUpdateStatusRequest updateStatusRequest);

    Integer purchaseWarehouseUpdate(PurchaseWarehouseUpdateRequest request);

    PurchaseOrderInfo getPurchaseOrderInfo(String orderNo);

    Boolean purchaseOrderFinish(List<String> orderNo);

    PurchaseOrderInfo queryMainById(Long id);

    Boolean purchasePayTag(String orderNo);

    /**
     * 采购订单货品模式分页查询
     *
     * @param request
     * @return
     */
    Page<PurchaseOrderModeModel> purchaseOrderPageModeQuery(PurchaseOrderPageQueryModeRequest request);
}